package edu.study.common.util.ftp;

import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang.StringUtils;

@Getter
@Setter
public class ProxyBean {

    private String proxyType;
    private String remoteAddress;
    private int remotePort;

    public boolean validate() {
        if (this.remotePort == 0) {
            this.remotePort = 22;
        }
        if ((StringUtils.isBlank(this.remoteAddress)) || (this.remotePort <= 0)) {
            return false;
        }
        return true;
    }

}
